ResourceUploadFile Method (String, String, Int32, ContentRange) |
Uploads a local file to a resource with the specified URI.
Namespace:
Independentsoft.Webdav
Assembly:
Independentsoft.Webdav (in Independentsoft.Webdav.dll) Version: 1.0.700.18437
Syntaxpublic FileUpload UploadFile(
string address,
string fileName,
int bufferSize,
ContentRange contentRange
)
Public Function UploadFile (
address As String,
fileName As String,
bufferSize As Integer,
contentRange As ContentRange
) As FileUpload
Parameters
- address
- Type: SystemString
The URI of the resource to receive the file. - fileName
- Type: SystemString
The file to send to the resource. - bufferSize
- Type: SystemInt32
The buffer size. Default value is 8192 bytes. - contentRange
- Type: Independentsoft.WebdavContentRange
The content range.
Return Value
Type:
FileUpload
Examples
The following example demonstrates how to use this method:
public void Upload()
{
resource.UploadProgress += new UploadProgressEventHandler(UploadProgress);
resource.UploadFile(remoteFile, localFile);
}
private void UploadProgress(Object sender,ProgressEventArgs e)
{
Console.WriteLine(e.Progress);
}
See Also